<?php
class RuserManageAction extends Action{
	
    public function userManage(){    	
    	//$this->assign("validateMenuJuri",true);

    	$this->assign("smarty",'/manage/page/marketingmanage/recommendusermanage/ruserManage.html');
        return $this->SMARTY;
    }
    
    public function queryUserlist(){
     	global $param,$userSession;
    	$params = $param->getParams();
    	tsLoad('/manage/busi/RecommendUserPage.class.php');
    	$params['myuserId']=$userSession->getUserSession()["userId"];
    	//收集当前传入的当前页信息
    	if($params['page']!=null)
    		$currentPage = $params['page'];
    	else
    		$currentPage =1;
    	//收集当前传入的一页多少条信息
    	if($params['rows']!=null)
    		$countPage = $params['rows'];
    	else
    		$countPage =10;
    	$recommendUserPage = new RecommendUserPage();
    	$pageInfo =$recommendUserPage->initPage($params, $countPage, $currentPage);
    	$rows = $recommendUserPage->getCurPageData();
    	
    	$this->assign("total",$pageInfo['countRow']);
    	$this->assign("rows",$rows);
    	return $this->JSON;
    }
    
    //升级用户
    public function upgradeMember(){
    	global $param,$userSession;
    	$params = $param->getParams();
    	tsLoad('/manage/busi/RecommendUserPage.class.php');
    	$recommendUserPage = new RecommendUserPage();
    	//查看野猪币是否足够
    	$params['myuserId']=$userSession->getUserSession()["userId"];
    	$result=$recommendUserPage->upgrade($params);
    	$this->assign("result",$result);
    	return $this->JSON;
    }
    
}
?>